package com.zmn.plat.admin.controller.common.map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.zmn.manager.common.utils.BaiduMapUtil;

/**
 * @author nowind
 * @since 2018/4/20 12:00
 */
@Controller
@RequestMapping("/map/")
public class MapController {

    // region 显示地图
    @RequestMapping("detail")
    public ModelAndView detail(@RequestParam(value = "latlng", defaultValue = "") String latlng) {

        latlng = BaiduMapUtil.baiduLatlng(latlng);

        ModelAndView mav = new ModelAndView("common/map/detail");

        mav.addObject("latlng", latlng);

        return mav;
    }
    // endregion
}
